package com.example.toy;

import com.example.toy.core.conf.ToyTableConfig;
import com.example.toy.core.table.ToyTable;
import com.example.toy.core.version.ToyVersion;
import org.apache.hadoop.fs.Path;

/**
 * ToyExternalSystem
 *
 * @author shenbing
 * @date 2021/12/23
 */
public interface ToyExternalSystem {

  /**
   * 从指定的路径加载一个toy表
   *
   * @param dir
   * @param version
   * @return
   */
  ToyTable loadTable(Path dir, ToyVersion version);

  /**
   * 从指定路径创建toy表
   *
   * @param dir
   * @param config
   * @return
   */
  ToyTable createTable(Path dir, ToyTableConfig config);
}
